home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 March / CHIP Mart 1997.iso / SurfCam / SURFCAM.Z / MAH-G17.M3 < prev    next >
Text File  |  1996-04-01  |  5KB  |  157 lines

  1. name Maho XY Plane (G17)
  2.  
  3. % 00
  4. ! 00
  5. N >9
  6. G >2
  7. b ->3.>4 B
  8. B ->3.>4
  9. X ->3.>4
  10. x ->3.>4 X
  11. Y ->3.>4
  12. y ->3.>4 Y
  13. Z ->3.>4
  14. z ->3.>4 Z Mult -1
  15. I ->3.>4
  16. i ->3.>4 I
  17. J ->3.>4
  18. K ->3.>4
  19. k ->3.>4 K
  20. F >3.1
  21. T >2
  22. M >2
  23. S >4
  24. W 00 
  25.  
  26. ModalLetters X Y Z F B                # List of letters that are modal    
  27.  
  28. ModalGs 0 1 2 3 81 83 84              # List of g codes that are modal    
  29.  
  30. Sequence#s N 1 1 1                    # Char, freq, incr & start          
  31. First#? N                             # Y or N  'Output 1st sequence no.  
  32. Last#? N                              # Y or N  'Output last sequence no. 
  33.  
  34. HCode X                               # X or X U  'Horizontal char.       
  35. VCode Y                               # Y or Y V  'Vertical char.         
  36. Dcode Z                               # Depth char.                       
  37. FeedCode F                            # Feed rate char.                   
  38.  
  39. Comment ( )                           # Begin End comment char.           
  40.  
  41. Spindle 3 4 5                         # Cw, ccw & stop m codes            
  42. Coolant 8 9 7                         # On, Off & Mist m codes            
  43. DComp 41 42 40                        # Left, Right & Cancel m codes      
  44. LComp 43 49                           # On & Off codes                    
  45.  
  46. Feed G1                             # Linear move                       
  47. Rapid G0                            # Rapid positioning word            
  48. Cw G2                               # Circular move clockwise           
  49. Ccw G3                              # Circular move counter clockwise   
  50.  
  51. Inc/Abs G 91 90                       # Inc & Abs char. & values          
  52.  
  53. CtrCode I J                           # I J or R or I J K L               
  54. Helical? N
  55.  
  56. Spaces? N                             # Y or N  'Spaces between words     
  57.  
  58. Incremental? N                        # Y or N  'Inc or abs output        
  59. CtrIncremental? N                     # Y or N  'Inc or abs I & J         
  60. ByQuadrants? N                        # Y or N  'Break arcs at quadrants  
  61.  
  62. UppercaseComments? Y                  # Y or N 'Require uppercase comments
  63.  
  64.  
  65. Drill 2                               # Drilling canned/manual cycle      
  66. G81 z[Depth] b[Rplane] F[Frate] y2
  67. G79 X[H] Z[PointD] Y[V]
  68. G79 X[H] Z[PointD] Y[V]
  69. end
  70.  
  71. Peck 2                                # Pecking canned/manual cycle       
  72. G83 z[Depth] b[RPlane] F[Frate] y2 i[VBite] k[VBite]
  73. G79 X[H] Z[PointD] Y[V]
  74. G79 X[H] Z[PointD] Y[V]
  75. end
  76.  
  77. Tap 2                                 # Tapping canned/manual cycle       
  78. G84 z[Depth] b[RPlane] F[Frate] y2
  79. G79 X[H] Z[PointD] Y[v]
  80. G79 X[H] Z[PointD] Y[v]
  81. end
  82.  
  83. Ream 2                                # Reaming canned/manual cycle       
  84. G85 z[Depth] b[RPlane] F[Frate] y2
  85. G79 X[H] Z[PointD] Y[V]
  86. G79 X[H] Z[PointD] Y[V]
  87. end
  88.  
  89. Bore 2                                # Boring canned/manual cycle        
  90. G86 z[Depth] b[Rplane] F[Frate] y2
  91. G79 X[H] Z[PointD] Y[V]
  92. G79 X[H] Z[PointD] Y[V]
  93. end
  94.  
  95. Back                                  # Back boring canned/manual cycle   
  96. end cancel
  97.  
  98. Cancel                                # Cancel a canned/manual cycle      
  99. G80
  100. end
  101.  
  102. Index Z                               # Index the rotary table            
  103. G0 Z[Val1]
  104. G0 B[Rotangle]
  105. end
  106.  
  107.                                       # Unwind the rotary table           
  108.                 G0 Y100
  109.                 G0 B0
  110.                 G0 B[LastRotAng]
  111.                 G0 Y[LastD]
  112.                 end
  113.  
  114. StartCode                             # Start of the program              
  115. Ask [Val7] " Enter Retract value in Z for toolchange : " "100"
  116. Ask [Val6] " Enter M-Function for toolchange         : " "6"
  117. Ask [Val8] " Enter Offset number                     : " "54"
  118. Ask [Val1] " Enter Retract value Z bef. rotarypos.   : " "100"
  119. %0
  120. !0 N[Program#]
  121. End
  122.  
  123. 1stToolChange                         # First tool change                 
  124. G17 T[Tool] M[Val6]
  125. G51
  126. G53
  127. G[Val8]
  128. G90
  129. G0 X[H] Y[V] Z[D] B[Rotangle] S[Speed] F[FRate] M13
  130. End
  131.  
  132. Infeed                                # Enable cutter comp                
  133. G1 Z[D] F[Plunge]
  134. G43 X[H] Y[V] F[FRate]
  135. G[Side]
  136. end
  137.  
  138. Outfeed                               # Disable cutter comp               
  139. G40
  140. G1 X[H] Y[V]
  141. end
  142.  
  143. ToolChange                            # Secondary tool changes            
  144. G0 Z[Val7]
  145. T[Tool] M[Val6]
  146. G0 X[H] Y[V] Z[D] S[Speed] F[FRate] M13
  147. End
  148.  
  149. EndCode                               # End of the program                
  150. G0 Z[Val7]
  151. G53
  152. M30
  153. W0
  154. End
  155.  
  156. Replace "%" with "%PM"
  157.